<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // let arr = ['appple', 'banana', 'orange', 'tomato', 'banana', 'orange']
        // let newArr = arr.some((val) => {
        //     return val === 'orange'
        // });
        // console.log(newArr); // 只要有一个条件符合返回true
    </script>

    <script>
        let arr = ['appple', 'banana', 'orange', 'tomato', 'banana', 'orange']

        function findarry(arr, item) {
            return arr.some((val) => {
                return val === item
            })
        };

        console.log(findarry(arr, 'orange'));
    </script>

</body>

</html>